//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension ServiceCatalogAppRegistry {
    // MARK: Enums

    public enum ResourceGroupState: String, CustomStringConvertible, Codable, _SotoSendable {
        case createComplete = "CREATE_COMPLETE"
        case createFailed = "CREATE_FAILED"
        case creating = "CREATING"
        case updateComplete = "UPDATE_COMPLETE"
        case updateFailed = "UPDATE_FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum ResourceType: String, CustomStringConvertible, Codable, _SotoSendable {
        case cfnStack = "CFN_STACK"
        case resourceTagValue = "RESOURCE_TAG_VALUE"
        public var description: String { return self.rawValue }
    }

    public enum SyncAction: String, CustomStringConvertible, Codable, _SotoSendable {
        case noAction = "NO_ACTION"
        case startSync = "START_SYNC"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AppRegistryConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  Includes the definition  of a tagQuery.
        public let tagQueryConfiguration: TagQueryConfiguration?

        public init(tagQueryConfiguration: TagQueryConfiguration? = nil) {
            self.tagQueryConfiguration = tagQueryConfiguration
        }

        public func validate(name: String) throws {
            try self.tagQueryConfiguration?.validate(name: "\(name).tagQueryConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case tagQueryConfiguration
        }
    }

    public struct Application: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the application across services.
        public let arn: String?
        /// The ISO-8601 formatted timestamp of the moment when the application was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the application.
        public let description: String?
        /// The identifier of the application.
        public let id: String?
        ///  The ISO-8601 formatted timestamp of the moment when the application was last updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the application. The name must be unique in the region in which you are creating the application.
        public let name: String?
        /// Key-value pairs you can use to associate with the application.
        public let tags: [String: String]?

        public init(arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastUpdateTime: Date? = nil, name: String? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastUpdateTime = lastUpdateTime
            self.name = name
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case description
            case id
            case lastUpdateTime
            case name
            case tags
        }
    }

    public struct ApplicationSummary: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the application across services.
        public let arn: String?
        /// The ISO-8601 formatted timestamp of the moment when the application was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the application.
        public let description: String?
        /// The identifier of the application.
        public let id: String?
        ///  The ISO-8601 formatted timestamp of the moment when the application was last updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the application. The name must be unique in the region in which you are creating the application.
        public let name: String?

        public init(arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastUpdateTime: Date? = nil, name: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastUpdateTime = lastUpdateTime
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case description
            case id
            case lastUpdateTime
            case name
        }
    }

    public struct AssociateAttributeGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri("application")),
            AWSMemberEncoding(label: "attributeGroup", location: .uri("attributeGroup"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The name or ID of the attribute group that holds the attributes to describe the application.
        public let attributeGroup: String

        public init(application: String, attributeGroup: String) {
            self.application = application
            self.attributeGroup = attributeGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "^[-.\\w]+$")
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, max: 256)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, min: 1)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, pattern: "^[-.\\w]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AssociateAttributeGroupResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) of the application that was augmented with attributes.
        public let applicationArn: String?
        /// The Amazon resource name (ARN) of the attribute group that contains the application's new attributes.
        public let attributeGroupArn: String?

        public init(applicationArn: String? = nil, attributeGroupArn: String? = nil) {
            self.applicationArn = applicationArn
            self.attributeGroupArn = attributeGroupArn
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn
            case attributeGroupArn
        }
    }

    public struct AssociateResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri("application")),
            AWSMemberEncoding(label: "resource", location: .uri("resource")),
            AWSMemberEncoding(label: "resourceType", location: .uri("resourceType"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The name or ID of the resource of which the application will be associated.
        public let resource: String
        /// The type of resource of which the application will be associated.
        public let resourceType: ResourceType

        public init(application: String, resource: String, resourceType: ResourceType) {
            self.application = application
            self.resource = resource
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "^[-.\\w]+$")
            try self.validate(self.resource, name: "resource", parent: name, max: 256)
            try self.validate(self.resource, name: "resource", parent: name, min: 1)
            try self.validate(self.resource, name: "resource", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AssociateResourceResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) of the application that was augmented with attributes.
        public let applicationArn: String?
        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String?

        public init(applicationArn: String? = nil, resourceArn: String? = nil) {
            self.applicationArn = applicationArn
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn
            case resourceArn
        }
    }

    public struct AttributeGroup: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the attribute group across services.
        public let arn: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the attribute group that the user provides.
        public let description: String?
        /// The globally unique attribute group identifier of the attribute group.
        public let id: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was last updated. This time is the same as the creationTime for a newly created attribute group.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the attribute group.
        public let name: String?
        /// Key-value pairs you can use to associate with the attribute group.
        public let tags: [String: String]?

        public init(arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastUpdateTime: Date? = nil, name: String? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastUpdateTime = lastUpdateTime
            self.name = name
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case description
            case id
            case lastUpdateTime
            case name
            case tags
        }
    }

    public struct AttributeGroupDetails: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the attribute group.
        public let arn: String?
        /// The unique identifier of the attribute group.
        public let id: String?
        ///   This field is no longer supported. We recommend you don't use the field when using ListAttributeGroupsForApplication.    The name of the attribute group.
        public let name: String?

        public init(arn: String? = nil, id: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = nil
        }

        @available(*, deprecated, message: "Members name have been deprecated")
        public init(arn: String? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case id
            case name
        }
    }

    public struct AttributeGroupSummary: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the attribute group across services.
        public let arn: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the attribute group that the user provides.
        public let description: String?
        /// The globally unique attribute group identifier of the attribute group.
        public let id: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was last updated. This time is the same as the creationTime for a newly created attribute group.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the attribute group.
        public let name: String?

        public init(arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastUpdateTime: Date? = nil, name: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastUpdateTime = lastUpdateTime
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case description
            case id
            case lastUpdateTime
            case name
        }
    }

    public struct CreateApplicationRequest: AWSEncodableShape {
        /// A unique identifier that you provide to ensure idempotency. If you retry a request that completed successfully using the same client token and the same parameters, the retry succeeds without performing any further actions. If you retry a successful request using the same client token, but one or more of the parameters are different, the retry fails.
        public let clientToken: String
        /// The description of the application.
        public let description: String?
        /// The name of the application. The name must be unique in the region in which you are creating the application.
        public let name: String
        /// Key-value pairs you can use to associate with the application.
        public let tags: [String: String]?

        public init(clientToken: String = CreateApplicationRequest.idempotencyToken(), description: String? = nil, name: String, tags: [String: String]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.name = name
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 128)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-.\\w]+$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case description
            case name
            case tags
        }
    }

    public struct CreateApplicationResponse: AWSDecodableShape {
        /// Information about the application.
        public let application: Application?

        public init(application: Application? = nil) {
            self.application = application
        }

        private enum CodingKeys: String, CodingKey {
            case application
        }
    }

    public struct CreateAttributeGroupRequest: AWSEncodableShape {
        /// A JSON string in the form of nested key-value pairs that represent the attributes in the group and describes an application and its components.
        public let attributes: String
        /// A unique identifier that you provide to ensure idempotency. If you retry a request that completed successfully using the same client token and the same parameters, the retry succeeds without performing any further actions. If you retry a successful request using the same client token, but one or more of the parameters are different, the retry fails.
        public let clientToken: String
        /// The description of the attribute group that the user provides.
        public let description: String?
        /// The name of the attribute group.
        public let name: String
        /// Key-value pairs you can use to associate with the attribute group.
        public let tags: [String: String]?

        public init(attributes: String, clientToken: String = CreateAttributeGroupRequest.idempotencyToken(), description: String? = nil, name: String, tags: [String: String]? = nil) {
            self.attributes = attributes
            self.clientToken = clientToken
            self.description = description
            self.name = name
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.attributes, name: "attributes", parent: name, max: 8000)
            try self.validate(self.attributes, name: "attributes", parent: name, min: 1)
            try self.validate(self.attributes, name: "attributes", parent: name, pattern: "^[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+$")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 128)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-.\\w]+$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case attributes
            case clientToken
            case description
            case name
            case tags
        }
    }

    public struct CreateAttributeGroupResponse: AWSDecodableShape {
        /// Information about the attribute group.
        public let attributeGroup: AttributeGroup?

        public init(attributeGroup: AttributeGroup? = nil) {
            self.attributeGroup = attributeGroup
        }

        private enum CodingKeys: String, CodingKey {
            case attributeGroup
        }
    }

    public struct DeleteApplicationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri("application"))
        ]

        /// The name or ID of the application.
        public let application: String

        public init(application: String) {
            self.application = application
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "^[-.\\w]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteApplicationResponse: AWSDecodableShape {
        /// Information about the deleted application.
        public let application: ApplicationSummary?

        public init(application: ApplicationSummary? = nil) {
            self.application = application
        }

        private enum CodingKeys: String, CodingKey {
            case application
        }
    }

    public struct DeleteAttributeGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "attributeGroup", location: .uri("attributeGroup"))
        ]

        /// The name or ID of the attribute group that holds the attributes to describe the application.
        public let attributeGroup: String

        public init(attributeGroup: String) {
            self.attributeGroup = attributeGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, max: 256)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, min: 1)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, pattern: "^[-.\\w]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteAttributeGroupResponse: AWSDecodableShape {
        /// Information about the deleted attribute group.
        public let attributeGroup: AttributeGroupSummary?

        public init(attributeGroup: AttributeGroupSummary? = nil) {
            self.attributeGroup = attributeGroup
        }

        private enum CodingKeys: String, CodingKey {
            case attributeGroup
        }
    }

    public struct DisassociateAttributeGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri("application")),
            AWSMemberEncoding(label: "attributeGroup", location: .uri("attributeGroup"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The name or ID of the attribute group that holds the attributes to describe the application.
        public let attributeGroup: String

        public init(application: String, attributeGroup: String) {
            self.application = application
            self.attributeGroup = attributeGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "^[-.\\w]+$")
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, max: 256)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, min: 1)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, pattern: "^[-.\\w]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateAttributeGroupResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the application.
        public let applicationArn: String?
        /// The Amazon resource name (ARN) that specifies the attribute group.
        public let attributeGroupArn: String?

        public init(applicationArn: String? = nil, attributeGroupArn: String? = nil) {
            self.applicationArn = applicationArn
            self.attributeGroupArn = attributeGroupArn
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn
            case attributeGroupArn
        }
    }

    public struct DisassociateResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri("application")),
            AWSMemberEncoding(label: "resource", location: .uri("resource")),
            AWSMemberEncoding(label: "resourceType", location: .uri("resourceType"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The name or ID of the resource.
        public let resource: String
        /// The type of the resource that is being disassociated.
        public let resourceType: ResourceType

        public init(application: String, resource: String, resourceType: ResourceType) {
            self.application = application
            self.resource = resource
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "^[-.\\w]+$")
            try self.validate(self.resource, name: "resource", parent: name, max: 256)
            try self.validate(self.resource, name: "resource", parent: name, min: 1)
            try self.validate(self.resource, name: "resource", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateResourceResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the application.
        public let applicationArn: String?
        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String?

        public init(applicationArn: String? = nil, resourceArn: String? = nil) {
            self.applicationArn = applicationArn
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn
            case resourceArn
        }
    }

    public struct GetApplicationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri("application"))
        ]

        /// The name or ID of the application.
        public let application: String

        public init(application: String) {
            self.application = application
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "^[-.\\w]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetApplicationResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the application across services.
        public let arn: String?
        /// The number of top-level resources that were registered as part of this application.
        public let associatedResourceCount: Int?
        /// The ISO-8601 formatted timestamp of the moment when the application was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the application.
        public let description: String?
        /// The identifier of the application.
        public let id: String?
        ///  The information  about the integration  of the application  with other services,  such as Resource Groups.
        public let integrations: Integrations?
        /// The ISO-8601 formatted timestamp of the moment when the application was last updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the application. The name must be unique in the region in which you are creating the application.
        public let name: String?
        /// Key-value pairs associated with the application.
        public let tags: [String: String]?

        public init(arn: String? = nil, associatedResourceCount: Int? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, integrations: Integrations? = nil, lastUpdateTime: Date? = nil, name: String? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.associatedResourceCount = associatedResourceCount
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.integrations = integrations
            self.lastUpdateTime = lastUpdateTime
            self.name = name
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case associatedResourceCount
            case creationTime
            case description
            case id
            case integrations
            case lastUpdateTime
            case name
            case tags
        }
    }

    public struct GetAssociatedResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri("application")),
            AWSMemberEncoding(label: "resource", location: .uri("resource")),
            AWSMemberEncoding(label: "resourceType", location: .uri("resourceType"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The name or ID of the resource associated with the application.
        public let resource: String
        /// The type of resource associated with the application.
        public let resourceType: ResourceType

        public init(application: String, resource: String, resourceType: ResourceType) {
            self.application = application
            self.resource = resource
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "^[-.\\w]+$")
            try self.validate(self.resource, name: "resource", parent: name, max: 256)
            try self.validate(self.resource, name: "resource", parent: name, min: 1)
            try self.validate(self.resource, name: "resource", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetAssociatedResourceResponse: AWSDecodableShape {
        /// The resource associated with the application.
        public let resource: Resource?

        public init(resource: Resource? = nil) {
            self.resource = resource
        }

        private enum CodingKeys: String, CodingKey {
            case resource
        }
    }

    public struct GetAttributeGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "attributeGroup", location: .uri("attributeGroup"))
        ]

        /// The name or ID of the attribute group that holds the attributes to describe the application.
        public let attributeGroup: String

        public init(attributeGroup: String) {
            self.attributeGroup = attributeGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, max: 256)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, min: 1)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, pattern: "^[-.\\w]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetAttributeGroupResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the attribute group across services.
        public let arn: String?
        /// A JSON string in the form of nested key-value pairs that represent the attributes in the group and describes an application and its components.
        public let attributes: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the attribute group that the user provides.
        public let description: String?
        /// The identifier of the attribute group.
        public let id: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was last updated. This time is the same as the creationTime for a newly created attribute group.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the attribute group.
        public let name: String?
        /// Key-value pairs associated with the attribute group.
        public let tags: [String: String]?

        public init(arn: String? = nil, attributes: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastUpdateTime: Date? = nil, name: String? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.attributes = attributes
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastUpdateTime = lastUpdateTime
            self.name = name
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case attributes
            case creationTime
            case description
            case id
            case lastUpdateTime
            case name
            case tags
        }
    }

    public struct GetConfigurationResponse: AWSDecodableShape {
        ///  Retrieves TagKey configuration  from an account.
        public let configuration: AppRegistryConfiguration?

        public init(configuration: AppRegistryConfiguration? = nil) {
            self.configuration = configuration
        }

        private enum CodingKeys: String, CodingKey {
            case configuration
        }
    }

    public struct Integrations: AWSDecodableShape {
        ///  The information about the resource group integration.
        public let resourceGroup: ResourceGroup?

        public init(resourceGroup: ResourceGroup? = nil) {
            self.resourceGroup = resourceGroup
        }

        private enum CodingKeys: String, CodingKey {
            case resourceGroup
        }
    }

    public struct ListApplicationsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The upper bound of the number of results to return (cannot exceed 25). If this parameter is omitted, it defaults to 25. This value is optional.
        public let maxResults: Int?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[A-Za-z0-9+/=]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListApplicationsResponse: AWSDecodableShape {
        /// This list of applications.
        public let applications: [ApplicationSummary]?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(applications: [ApplicationSummary]? = nil, nextToken: String? = nil) {
            self.applications = applications
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case applications
            case nextToken
        }
    }

    public struct ListAssociatedAttributeGroupsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri("application")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The upper bound of the number of results to return (cannot exceed 25). If this parameter is omitted, it defaults to 25. This value is optional.
        public let maxResults: Int?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(application: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.application = application
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "^[-.\\w]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[A-Za-z0-9+/=]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAssociatedAttributeGroupsResponse: AWSDecodableShape {
        /// A list of attribute group IDs.
        public let attributeGroups: [String]?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(attributeGroups: [String]? = nil, nextToken: String? = nil) {
            self.attributeGroups = attributeGroups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attributeGroups
            case nextToken
        }
    }

    public struct ListAssociatedResourcesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri("application")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The upper bound of the number of results to return (cannot exceed 25). If this parameter is omitted, it defaults to 25. This value is optional.
        public let maxResults: Int?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(application: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.application = application
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "^[-.\\w]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[A-Za-z0-9+/=]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAssociatedResourcesResponse: AWSDecodableShape {
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?
        /// Information about the resources.
        public let resources: [ResourceInfo]?

        public init(nextToken: String? = nil, resources: [ResourceInfo]? = nil) {
            self.nextToken = nextToken
            self.resources = resources
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resources
        }
    }

    public struct ListAttributeGroupsForApplicationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri("application")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The upper bound of the number of results to return. The value cannot exceed 25. If you omit this parameter, it defaults to 25. This value is optional.
        public let maxResults: Int?
        /// This token retrieves the next page of results after a previous API call.
        public let nextToken: String?

        public init(application: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.application = application
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "^[-.\\w]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[A-Za-z0-9+/=]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAttributeGroupsForApplicationResponse: AWSDecodableShape {
        ///  The details related to a specific attribute group.
        public let attributeGroupsDetails: [AttributeGroupDetails]?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(attributeGroupsDetails: [AttributeGroupDetails]? = nil, nextToken: String? = nil) {
            self.attributeGroupsDetails = attributeGroupsDetails
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attributeGroupsDetails
            case nextToken
        }
    }

    public struct ListAttributeGroupsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The upper bound of the number of results to return (cannot exceed 25). If this parameter is omitted, it defaults to 25. This value is optional.
        public let maxResults: Int?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[A-Za-z0-9+/=]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAttributeGroupsResponse: AWSDecodableShape {
        /// This list of attribute groups.
        public let attributeGroups: [AttributeGroupSummary]?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(attributeGroups: [AttributeGroupSummary]? = nil, nextToken: String? = nil) {
            self.attributeGroups = attributeGroups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attributeGroups
            case nextToken
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1600)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:([a-z]{2}(-gov)?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags on the resource.
        public let tags: [String: String]?

        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct PutConfigurationRequest: AWSEncodableShape {
        ///  Associates a TagKey configuration  to an account.
        public let configuration: AppRegistryConfiguration

        public init(configuration: AppRegistryConfiguration) {
            self.configuration = configuration
        }

        public func validate(name: String) throws {
            try self.configuration.validate(name: "\(name).configuration")
        }

        private enum CodingKeys: String, CodingKey {
            case configuration
        }
    }

    public struct Resource: AWSDecodableShape {
        /// The Amazon resource name (ARN) of the resource.
        public let arn: String?
        /// The time the resource was associated with the application.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var associationTime: Date?
        /// The service integration information about the resource.
        public let integrations: ResourceIntegrations?
        /// The name of the resource.
        public let name: String?

        public init(arn: String? = nil, associationTime: Date? = nil, integrations: ResourceIntegrations? = nil, name: String? = nil) {
            self.arn = arn
            self.associationTime = associationTime
            self.integrations = integrations
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case associationTime
            case integrations
            case name
        }
    }

    public struct ResourceDetails: AWSDecodableShape {
        /// The value of the tag.
        public let tagValue: String?

        public init(tagValue: String? = nil) {
            self.tagValue = tagValue
        }

        private enum CodingKeys: String, CodingKey {
            case tagValue
        }
    }

    public struct ResourceGroup: AWSDecodableShape {
        /// The Amazon resource name (ARN) of the resource group.
        public let arn: String?
        /// The error message that generates when the propagation process for the resource group fails.
        public let errorMessage: String?
        /// The state of the propagation process for the resource group. The states includes:  CREATING if the resource group is in the process of being created.  CREATE_COMPLETE if the resource group was created successfully.  CREATE_FAILED if the resource group failed to be created.  UPDATING if the resource group is in the process of being updated.  UPDATE_COMPLETE if the resource group updated successfully.  UPDATE_FAILED if the resource group could not update successfully.
        public let state: ResourceGroupState?

        public init(arn: String? = nil, errorMessage: String? = nil, state: ResourceGroupState? = nil) {
            self.arn = arn
            self.errorMessage = errorMessage
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case errorMessage
            case state
        }
    }

    public struct ResourceInfo: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the resource across services.
        public let arn: String?
        /// The name of the resource.
        public let name: String?
        ///  The details related to the resource.
        public let resourceDetails: ResourceDetails?
        ///  Provides information  about the Service Catalog App Registry resource type.
        public let resourceType: ResourceType?

        public init(arn: String? = nil, name: String? = nil, resourceDetails: ResourceDetails? = nil, resourceType: ResourceType? = nil) {
            self.arn = arn
            self.name = name
            self.resourceDetails = resourceDetails
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case name
            case resourceDetails
            case resourceType
        }
    }

    public struct ResourceIntegrations: AWSDecodableShape {
        /// The information about the integration of Resource Groups.
        public let resourceGroup: ResourceGroup?

        public init(resourceGroup: ResourceGroup? = nil) {
            self.resourceGroup = resourceGroup
        }

        private enum CodingKeys: String, CodingKey {
            case resourceGroup
        }
    }

    public struct SyncResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resource", location: .uri("resource")),
            AWSMemberEncoding(label: "resourceType", location: .uri("resourceType"))
        ]

        /// An entity you can work with and specify with a name or ID. Examples include an Amazon EC2 instance, an Amazon Web Services CloudFormation stack, or an Amazon S3 bucket.
        public let resource: String
        /// The type of resource of which the application will be associated.
        public let resourceType: ResourceType

        public init(resource: String, resourceType: ResourceType) {
            self.resource = resource
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.resource, name: "resource", parent: name, max: 256)
            try self.validate(self.resource, name: "resource", parent: name, min: 1)
            try self.validate(self.resource, name: "resource", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct SyncResourceResponse: AWSDecodableShape {
        /// The results of the output if an application is associated with an ARN value, which could be syncStarted or None.
        public let actionTaken: SyncAction?
        /// The Amazon resource name (ARN) that specifies the application.
        public let applicationArn: String?
        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String?

        public init(actionTaken: SyncAction? = nil, applicationArn: String? = nil, resourceArn: String? = nil) {
            self.actionTaken = actionTaken
            self.applicationArn = applicationArn
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case actionTaken
            case applicationArn
            case resourceArn
        }
    }

    public struct TagQueryConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  Condition  in the IAM policy  that associates resources  to an application.
        public let tagKey: String?

        public init(tagKey: String? = nil) {
            self.tagKey = tagKey
        }

        public func validate(name: String) throws {
            try self.validate(self.tagKey, name: "tagKey", parent: name, max: 128)
            try self.validate(self.tagKey, name: "tagKey", parent: name, pattern: "^(?!\\s+$)[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case tagKey
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String
        /// The new or modified tags for the resource.
        public let tags: [String: String]

        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1600)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:([a-z]{2}(-gov)?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn")),
            AWSMemberEncoding(label: "tagKeys", location: .querystring("tagKeys"))
        ]

        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String
        /// A list of the tag keys to remove from the specified resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1600)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:([a-z]{2}(-gov)?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^[a-zA-Z+-=._:/]+$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateApplicationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri("application"))
        ]

        /// The name or ID of the application that will be updated.
        public let application: String
        /// The new description of the application.
        public let description: String?
        /// Deprecated: The new name of the application. The name must be unique in the region in which you are updating the application. Please do not use this field as we have stopped supporting name updates.
        public let name: String?

        public init(application: String, description: String? = nil) {
            self.application = application
            self.description = description
            self.name = nil
        }

        @available(*, deprecated, message: "Members name have been deprecated")
        public init(application: String, description: String? = nil, name: String? = nil) {
            self.application = application
            self.description = description
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "^[-.\\w]+$")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-.\\w]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case name
        }
    }

    public struct UpdateApplicationResponse: AWSDecodableShape {
        /// The updated information of the application.
        public let application: Application?

        public init(application: Application? = nil) {
            self.application = application
        }

        private enum CodingKeys: String, CodingKey {
            case application
        }
    }

    public struct UpdateAttributeGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "attributeGroup", location: .uri("attributeGroup"))
        ]

        /// The name or ID of the attribute group that holds the attributes to describe the application.
        public let attributeGroup: String
        /// A JSON string in the form of nested key-value pairs that represent the attributes in the group and describes an application and its components.
        public let attributes: String?
        /// The description of the attribute group that the user provides.
        public let description: String?
        /// Deprecated: The new name of the attribute group. The name must be unique in the region in which you are updating the attribute group. Please do not use this field as we have stopped supporting name updates.
        public let name: String?

        public init(attributeGroup: String, attributes: String? = nil, description: String? = nil) {
            self.attributeGroup = attributeGroup
            self.attributes = attributes
            self.description = description
            self.name = nil
        }

        @available(*, deprecated, message: "Members name have been deprecated")
        public init(attributeGroup: String, attributes: String? = nil, description: String? = nil, name: String? = nil) {
            self.attributeGroup = attributeGroup
            self.attributes = attributes
            self.description = description
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, max: 256)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, min: 1)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, pattern: "^[-.\\w]+$")
            try self.validate(self.attributes, name: "attributes", parent: name, max: 8000)
            try self.validate(self.attributes, name: "attributes", parent: name, min: 1)
            try self.validate(self.attributes, name: "attributes", parent: name, pattern: "^[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+$")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-.\\w]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributes
            case description
            case name
        }
    }

    public struct UpdateAttributeGroupResponse: AWSDecodableShape {
        /// The updated information of the attribute group.
        public let attributeGroup: AttributeGroup?

        public init(attributeGroup: AttributeGroup? = nil) {
            self.attributeGroup = attributeGroup
        }

        private enum CodingKeys: String, CodingKey {
            case attributeGroup
        }
    }
}

// MARK: - Errors

/// Error enum for ServiceCatalogAppRegistry
public struct ServiceCatalogAppRegistryErrorType: AWSErrorType {
    enum Code: String {
        case conflictException = "ConflictException"
        case internalServerException = "InternalServerException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceQuotaExceededException = "ServiceQuotaExceededException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize ServiceCatalogAppRegistry
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// There was a conflict when processing the request (for example, a resource with the given name already exists within the account).
    public static var conflictException: Self { .init(.conflictException) }
    /// The service is experiencing internal problems.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The specified resource does not exist.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The maximum number of resources per account has been reached.
    public static var serviceQuotaExceededException: Self { .init(.serviceQuotaExceededException) }
    /// The request has invalid or missing parameters.
    public static var validationException: Self { .init(.validationException) }
}

extension ServiceCatalogAppRegistryErrorType: Equatable {
    public static func == (lhs: ServiceCatalogAppRegistryErrorType, rhs: ServiceCatalogAppRegistryErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension ServiceCatalogAppRegistryErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
